package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.ChongZhiOrderBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GotoMakePayOrderMethods extends BaseMethods {

    private static GotoMakePayOrderMethods m_ins = null;

    public static GotoMakePayOrderMethods getInstance() {
        if (m_ins == null) {
            synchronized (GotoMakePayOrderMethods.class) {
                if (m_ins == null) {
                    m_ins = new GotoMakePayOrderMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "Order/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void orderRecharge(Subscriber<ChongZhiOrderBean> subscriber,
                      int uid,
                      String hashid,int goodsid ) {
        Observable observable = initService().orderRecharge(System.currentTimeMillis()+"",
                "0ae60f5374b3e932ee5cae2bf216297f",uid,hashid,goodsid
        );
        toSubscribe(observable, subscriber);
    }
}
